﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Default2 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string s3 = Request.Form["name"];//这样只能处理post..
        if (Request.Form["name"] != null)
        {
            Response.Write(Request.Form["name"].ToString() + "++++++++");
            Response.End();
        }
        else
        {
            string s =Request.QueryString["name"];
            if (Request.QueryString["name"] != null)//这里处理get
            {
                Response.Write(s);
                Response.End();
            }
            Response.Write( "++++++++");
            Response.End();
        }
/*
        if (IsPostBack)//IsPostBack=false时表示是第一次请求
        {   //这里处理回传
            string s2 = Request.Form["name"];
            if (Request.Form["name"] != null)//有可能undefined
            {
                  Response.Write(Request.Form["name"].ToString() + "++++++++");


                Response.End();
                //Literal1.Text = Request.Form["na"];
            }
            else
            {
               // Response.Write("没有na值");
               // Response.End();
            }
        }
        else
        {
            //这里处理第一次请求,即页面刚打开的时候
        }
*/
    }
}